/**
 * @description 表单格式校验，提示的那一种
 * @author 盘古他爹
 */

//  name: [
//     {
//       required: true,
//       message: 'Please input Activity name',
//       trigger: 'blur',
//     },
//     {
//       min: 3,
//       max: 5,
//       message: 'Length should be 3 to 5',
//       trigger: 'blur',
//     },
//   ],
import { ElForm } from "element-plus"
class _FormValid {
 async formRules(form: InstanceType<typeof ElForm>) {
    //返回table的rules
    try {
        const res = await form.validate()
    return res
    } catch(err) {
        console.log("err:", err);
        return false
        
    }
  }
}

const FormValid = new _FormValid()

export {
    FormValid
}
